import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);

const router = new Router({
    routes: [
        { path: '*', redirect: '/home' },
        // 首页
        { name: 'home',path: '/home',component: () => import('../views/home'),meta: { title: '首页'}},
        // 识别结果
        { name: 'shibie',path: '/selectCharacteristic',component: () => import('../views/tongue/selectCharacteristic'),meta: { title: '识别'}},
        // 报告结果
        { name: 'report',path: '/tongue/reportResult',component: () => import('../views/tongue/reportResult'),meta: { title: '报告'}},
        // 舌象详情页
        { name: 'tongue_details',path: '/tongue/discernResult',component: () => import('../views/tongue/discernResult'),meta: { title: '舌像详情'}},
    ]
})
router.afterEach(() => {
    document.body.scrollTop = 0;
    document.documentElement.scrollTop = 0;
})

export default router